﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Project01
{
    class MonsterType02:Monster
    {
         private float Rotation;
      
        public MonsterType02(Game game)
            : base(game)
        {
            this.ObjectTexture = game.Content.Load<Texture2D>("Images/Monster/Mtype02");
            this.Sprite = new AnimationSprite(ObjectTexture, 1, 4);
            this.Speed = 3;
            this.Health = 2;
            this.game = game;

        }
        public override void Update(GameTime gameTime)
        {
            Exp.Sprite.Position = SetPositionExplosion(Sprite.Position,-5,0);
            Rotation += (float)gameTime.ElapsedGameTime.TotalSeconds;
            Sprite.Update();
            Sprite.Rotation = MathHelper.Clamp((float)Math.Sin(Rotation), -0.5f, 0.5f);
            Sprite.Position = Move.MoveZigZac(Sprite.Position, Speed, Sprite.Rotation);
            Active = CheckPosition(Sprite.Position);
            base.Update(gameTime);
        }
        public override void Draw(SpriteBatch SpriteBatch)
        {

            base.Draw(SpriteBatch);
        }
    }
}
